<extend name="./public/frame.html"/>
<block name="content">
    <table class="layui-table" lay-size="sm" style="margin-bottom: 15px">
        <colgroup>
            <col width="150">
            <col>
        </colgroup>
        <thead>
        <tr>
            <th>名称</th>
            <th>详情</th>
        </tr>
        </thead>
        <tbody>
        <tr>
            <td>订单号</td>
            <td><?php echo $data['order_sn'];?></td>
        </tr>
        <tr>
            <td>出发地</td>
            <td><?php echo $data['start_name'];?></td>
        </tr>
        <tr>
            <td>目的地</td>
            <td><?php echo $data['arrive_name'];?></td>
        </tr>
        <tr>
            <td>上车时间</td>
            <td><?php if(!empty($data['on_car_time'])):?><?php echo date("Y-m-d H:i:s",$data['on_car_time']);?><?php endif;?></td>
        </tr>
        <tr>
            <td>下车时间</td>
            <td><?php if(!empty($data['off_car_time'])):?><?php echo date("Y-m-d H:i:s",$data['off_car_time']);?><?php endif;?></td>
        </tr>
        <tr>
            <td>司机姓名</td>
            <td><?php echo $data['driver_name'];?></td>
        </tr>
        <tr>
            <td>司机身份证</td>
            <td><?php echo $data['id_number'];?></td>
        </tr>
        <tr>
            <td>司机手机号</td>
            <td><?php echo $data['driver_phone'];?></td>
        </tr>
        <tr>
            <td>车牌号</td>
            <td><?php echo $data['car_plate'];?></td>
        </tr>
        <tr>
            <td>颜色</td>
            <td><?php echo $data['color'];?></td>
        </tr>
        <tr>
            <td>司机头像</td>
            <td class="layer-photos-demo"><?php if(!empty($data['driver_avatar'])):?><img src="<?php echo $data['driver_avatar'];?>"><?php else:?>-<?php endif;?></td>
        </tr>
        <tr>
            <td>司机驾驶证</td>
            <td class="layer-photos-demo"><?php if(!empty($data['license'])):?><img src="<?php echo $data['license'];?>"><?php else:?>-<?php endif;?></td>
        </tr>
        <tr>
            <td>司机行驶证</td>
            <td class="layer-photos-demo"><?php if(!empty($data['license'])):?><img src="<?php echo $data['permit'];?>"><?php else:?>-<?php endif;?></td>
        </tr>
        </tbody>
    </table>
    <script>
        layui.use('table', function () {
            var table = layui.table;
            layer.photos({
                photos: '.layer-photos-demo'
                , anim: 5 //0-6的选择，指定弹出图片动画类型，默认随机（请注意，3.0之前的版本用shift参数）
                , tab: function (pic, layero) {
                    var str = "<div style='text-align: center'>" + pic.alt + "</div>";
                    layero.prepend(str);
                }
            });
        });
    </script>
</block>
